﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

namespace mcmdFinder
{
    public partial class toolBoxes : Form
    {
        public toolBoxes()
        {
            InitializeComponent();
        }

        // Copy & Create Folders
        private void button1_Click(object sender, EventArgs e)
        {
            Process process = new Process();
            process.StartInfo.FileName = "cmd.exe";
            process.StartInfo.UseShellExecute = false;
            process.StartInfo.CreateNoWindow = true;

            // Copy temp folder
            if (this.checkBoxTempFolder.Checked)
            {
                string strCommand = "xcopy D:\\temp\\Templates D:\\temp\\" + this.textBoxJIRANumber.Text + " /E /I";
                process.StartInfo.Arguments = "/C " + strCommand;
                process.Start();

                MessageBox.Show("Temp folder copied!!");
            }

            // Create Pic Folder
            if (this.checkBoxPicFolder.Checked)
            {
                string strCommand = "mkdir C:\\Docume~1\\chris.yin\\MyDocu~1\\MyPict~1\\jira\\" + this.textBoxJIRANumber.Text;
                process.StartInfo.Arguments = "/C " + strCommand;
                process.Start();

                MessageBox.Show("Pic folder created!!");
            }

            
        }


        // Open Popular Folder -- DLX Client Config
        private void buttonDlxClientConfig_Click(object sender, EventArgs e)
        {
            Process process = new Process();
            process.StartInfo.FileName = this.textBoxDLXClientConfig.Text;
            process.Start();
        }

        private void groupBoxPopFolder_Enter(object sender, EventArgs e)
        {

        }

        private void buttonOpenJIRATemp_Click(object sender, EventArgs e)
        {
            Process process = new Process();
            process.StartInfo.FileName = this.textBoxJIRATemp.Text;
            process.Start();
        }

        private void buttonOpenMyProject_Click(object sender, EventArgs e)
        {
            Process process = new Process();
            process.StartInfo.FileName = this.textBoxMyProject.Text;
            process.Start();
        }
    }
}
